package controller;

import controller.dialog.DialogExit;
import controller.dialog.DialogPopUpMenu;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.stage.Stage;
import prjbancoimobilitariocliente.PrjBancoImobilitarioCliente;

/**
 * Controller do palco inicial do jogo.
 * @author Adriano
 */
public class IndexController implements Initializable{
    private static Stage s;
    @Override
    public void initialize(URL location, ResourceBundle resources) { }
    
    /**Iniciar o jogo*/
    @FXML
    public void play(ActionEvent event) throws IOException{
        Parent root = FXMLLoader.load(getClass().getResource("/view/jogador/Cadastro.fxml"));
        PrjBancoImobilitarioCliente.getInstace().setStage(root);
    }
    
    /**Definir configurações do jogo.*/
    @FXML
    public void configuracoes(ActionEvent event) throws IOException{
        Parent root = FXMLLoader.load(getClass().getResource("/view/jogador/Configuracao.fxml"));
        PrjBancoImobilitarioCliente.getInstace().setStage(root);
    }
    
    /**Sair do jogo.*/
    @FXML
    public void sair(ActionEvent event) throws IOException{
        DialogExit.getIntancia().show();
    }
}
